Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tsystems 140 upgrade spring boot to 2.6.x #697

Merged
merged 9 commits into from
May 22, 2024

Conversation

tkuzynow
Copy link
Contributor

Fixes #

Proposed Changes

Copy link

Quality Gate Passed Quality Gate passed

Issues
136 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@patric-dosch-vi patric-dosch-vi self-requested a review May 21, 2024 07:33
Copy link
Contributor

@patric-dosch-vi patric-dosch-vi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @tkuzynow, some comments, but not all tests visited.
Is the juni4 support removed? or do we agreed on upgrading from junit 4 to 5 in that? This is not a security issue I would say.

@@ -39,7 +39,9 @@ spring.liquibase.enabled=false
# Test datasource
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:db;DB_CLOSE_DELAY=-1
spring.sql.init.data-locations=classpath:database/UserServiceDatabase.sql
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is the difference here between
spring.sql.init.data-locations and spring.datasource.data?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spring boot reworked properties, so the convention for some of them changed, now we need to use spring.sql.init.data-locations

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a look if we need the "old" spring.datasource.data property

import org.springframework.web.util.UriTemplateHandler;

@SpringBootTest
@ExtendWith(OutputCaptureExtension.class)
@AutoConfigureMockMvc
// @AutoConfigureMockMvc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove if not needed - is there a pattern? As I see correct many other tests still have this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is no pattern -> it was required change for these tests to prevent execution on the mock Controller class. Without it all tests of this class were failing, they were not even reaching method body.

pom.xml Show resolved Hide resolved
@tkuzynow
Copy link
Contributor Author

hey @tkuzynow, some comments, but not all tests visited. Is the juni4 support removed? or do we agreed on upgrading from junit 4 to 5 in that? This is not a security issue I would say.

hey @patric-dosch-vi , I agree it's not required, this is side effect of using open rewrite plugin, which helps running this upgrade. I did not spend manual effort to migrate the tests from junit4 to junit5.

@tkuzynow tkuzynow merged commit d14e1dd into develop May 22, 2024
4 of 6 checks passed
@tkuzynow tkuzynow deleted the TSYSTEMS-140-upgrade-spring-boot-to-2.6.X branch May 22, 2024 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants